import {
	http
} from "@/common/request.js";
// 记录环节学习时长
export function recordStudyTime(taskId,courseStuId, studyTime) {
  return http.request({
    url: `/student/courseStudyManager/recordStudyTime/${taskId}/${courseStuId}/${studyTime}`,
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
}
// 获取一级目录信息
export function level1_Info(id, studentId) {
    return http.request({
      url: `/student/courseStudyManager/chapterInfo/${id}/${studentId}`,
      method: "get",
    });
}
// 获取二级目录信息
export function level2_Info(id, studentId) {
    return http.request({
      url: `/student/courseStudyManager/taskInfo/${id}/${studentId}`,
      method: "get",
    });
}
// 任务完成学习
export function taskComplete(taskId,courseStuId, time) {
    return http.request({
      url: `/student/courseStudyManager/taskComplete/${taskId}/${courseStuId}/${time}`,
      method: "post",
    });
}

  